{% load static %}
<table class="table for-pagination-users">
  <thead>
    <tr>
      <td class="cell">
      </td>
      <th width="50%">
        <a href='#'>
        Name
        </a>
        <span class="caret"></span>
      </th>
      <th>
        <a href="#">
        Email
        </a>
      </th>
    </tr>
  </thead>
  <tbody>
    {% ifequal users|length  0 %}
    <tr>
      <td class="cell">
        NO USERS FOUND!!
      </td>
    </tr>
    {% endifequal %}
    {% for user in users %}
    <tr>
      <td class="cell">
        <input type="checkbox" class="checkuser" value="{{ user.id }}"/>
      </td>
      <td class="cell">
        <a class="cell username" id="{{ user.id }}">{{ user.username }}</a>
      </td>
      <td class="cell useremail">
        {{ user.email }}
      </td>
    </tr>
    {% endfor %}
  </tbody>
</table>
<div class="pagination_row text-center row marl">
  <ul class="pagination">
    <li>
      {% if users.has_previous %}
      <a class="paginate-me-users" href="?page={{ users.previous_page_number }}">Previous</a>
      {% endif %}
    </li>
    <li>
      {% for page in users.paginator.page_range %}
    <li class="{% if users.number == page %}active{% endif %}"><a class="paginate-me-users"
      href="?page={{ page }}">{{ page }}</a>
    </li>
    {% endfor %}
    </li>
    <li>
      {% if users.has_next %}
      <a class="paginate-me-users" href="?page={{ users.next_page_number }}">Next</a>
      {% endif %}
    </li>
  </ul>
</div>
<script src="{% static 'js/setstatus.js' %}"></script>